#include "Map_Set_use_RBTree.h"

template<class K, class T>
class my_map
{
	struct MapKeyOf
	{
		const K& operator(const pair<const K, T>& data)
		{
			return data.first;
		}
	};

	typedef typename RBTreeIterator<T, T*, T&> iterator;
	typedef typename RBTreeIterator<T, const T*, const T&> const_iterator;

public:

	iterator begin()
	{
		return _t.begin();
	}

	iterator end()
	{
		return _t.end();
	}

	bool insert(const pair<const K, T>& data)
	{
		return _t.Insert(data);
	}

private:
	RBTree<T, pair<const K, T>, MapKeyOf> _t;
};




